/*************************************************************************
	> File Name: main.h
	> Author: QiyangXia
	> Mail: 834061456@qq.com 
	> Created Time: 2021年12月31日 星期五 17时30分13秒
 ***********************************************************************/
#ifndef MAIN_H
#define MAIN_H

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>

#define NAME_LEN 20

struct stu
{
	int no;
	char name[NAME_LEN];
	char sex[1];
	float math;
	float english;
	float chinese;
};

struct myclass
{
	int cnt;
	int max;
	struct stu* pt;
};

int mainloop(struct myclass *pcls);
int ui();
struct myclass *create_stuinfo_mem(int maxsize);
int destroy_stuinfo_mem(struct myclass *pcls);
int insert_student(struct myclass *pcls,struct stu pt);
void printdata(struct myclass *pcls);
void del_data(struct myclass *pcls,int a);
int search_no(struct myclass *pcls,int no);
void change_data(struct myclass *pcls);  
int search_name(struct myclass *pcls,char *ename); 
void bubble_sort_english(struct myclass *pcls);
void bubble_sort_chinese(struct myclass *pcls); 
void sel_sort_math(struct myclass *pcls);
void insert_sort_sum(struct myclass *pcls);


#endif
